import Vue from 'vue';
import Router from 'vue-router';

import CardList from '@/components/page/card';
import CardApply from '@/components/page/apply';
import Order from '@/components/page/order';
import Goods from '@/components/page/goods';
import User from '@/components/page/user';

import FlashGoods from '@/components/page/flash/goods';
import FlashTicket from '@/components/page/flash/ticket';
import FlashOrder from '@/components/page/flash/order';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/flash/order'
    },
    {
      path: '/card/list',
      name: 'cardList',
      component: CardList
    },
    {
      path: '/card/apply',
      name: 'cardApply',
      component: CardApply
    },
    {
      path: '/order',
      name: 'order',
      component: Order
    },
    {
      path: '/goods',
      name: 'goods',
      component: Goods
    },
    {
      path: '/flash/goods',
      name: 'flashGoods',
      component: FlashGoods
    },
    {
      path: '/flash/ticket',
      name: 'flashTicket',
      component: FlashTicket
    },
    {
      path: '/flash/order',
      name: 'flashOrder',
      component: FlashOrder
    },
    {
      path: '/user',
      name: 'user',
      component: User
    }
  ]
});
